books= {"Python实战入门三剑客":176.5, "C Primer Plus":107, '深度学习':161.7,'统计学习方法':87.2, 'Data Analysis with Open Source Tools':76.5, 'Python神经网络编程':66.2, 'TensorFlow技术解析与实战':75.8}
class Book:
    def __init__(self,book_name,num,free_ship):
        self.book_name=book_name
        self.num=num
        self.free_ship=free_ship
    def totals(self):
        global books
        money=books[self.book_name]
        all_money=money*self.num
        if all_money>self.free_ship:
            return all_money
        else:
            return all_money+5*self.num
if __name__=='__main__':
    book_a=Book('TensorFlow技术解析与实战',3,100)
    a_total=book_a.totals()
    if isinstance(a_total,float):
        print(f"{a_total:.2f}")
    else:
        print(a_total)
